import ThemeContext from "../context/theme_context";

function withTheme(WrappedComponent) {
  return function (props) {
    return (
      <ThemeContext.Consumer>
        {(value) => {
          return <WrappedComponent {...props} {...value} />;
        }}
      </ThemeContext.Consumer>
    );
  };
}

export default withTheme;